#
# build example and install to prefix/bin directory if needed
#

unset(COMPONENT_LIBRARY)
if(${BUILD_SHARED_LIBS} STREQUAL "ON")
    set(COMPONENT_LIBRARY ${COMPONENT_NAME})
else()
    set(COMPONENT_LIBRARY ${COMPONENT_NAME}_static)
endif()

add_executable(ringbuffer_eg ringbuffer.c)
target_link_libraries(ringbuffer_eg ${COMPONENT_LIBRARY})
install(FILES ringbuffer.c DESTINATION example/${PROJECT_NAME})

add_executable(nolock_queue_eg nolock_queue.c)
target_link_libraries(nolock_queue_eg ${COMPONENT_LIBRARY})
install(FILES nolock_queue.c DESTINATION example/${PROJECT_NAME})
